import request from "../../utils/request";

// 获取泳道
const getList = params => request({
  url: `v1/project/needs/swimlane/${params.id}/list`,
  method: 'get',
  params: params
});

const create = (data) => request({
  url: 'v1/project/needs/swimlane',
  method: 'post',
  data: data
});
const getByid = (params) => request({
  url: `v1/project/needs/${params.id}`,
  method: 'get',
  data: params
});
// 删除泳道
const delSwimById = (data) => request({
  url: `v1/project/needs/swimlane/${data.id}`,
  method: 'delete',
  data: data
})
// 通过卡片转计划
const toPlanById = (data) => request({
  url: `v1/project/needs/swimlane/changed/${data.id}/plan`,
  method: 'put',
  data: data
})
export default {
  getList,
  create,
  getByid,
  delSwimById,
  toPlanById
}
